package com.tgy.jwt.token;

import io.jsonwebtoken.Claims;

import java.io.Serializable;

/**
 * 〈token验证结果〉
 *
 * @author tanggy
 * @create 2019/4/8
 */
public class CheckResult implements Serializable {

    private static final long serialVersionUID = -3046895948726102318L;

    //结果 true false
    private boolean success;

    //错误代码
    private String errCode;

    //解析后的结果，实际为map
    private Claims claims;


    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public Claims getClaims() {
        return claims;
    }

    public void setClaims(Claims claims) {
        this.claims = claims;
    }

    @Override
    public String toString() {
        return "CheckResult{" +
                "success=" + success +
                ", errCode='" + errCode + '\'' +
                ", claims=" + claims +
                '}';
    }
}
